Optimal. Leaf size=194 \[ -\frac {b^2 \cos (e+f x) (d \sin (e+f x))^{1+m}}{d f (2+m)}+\frac {\left (b^2 (1+m)+a^2 (2+m)\right ) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1+m}{2};\frac {3+m}{2};\sin ^2(e+f x)\right ) (d \sin (e+f x))^{1+m}}{d f (1+m) (2+m) \sqrt {\cos ^2(e+f x)}}+\frac {2 a b \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {2+m}{2};\frac {4+m}{2};\sin ^2(e+f x)\right ) (d \sin (e+f x))^{2+m}}{d^2 f (2+m) \sqrt {\cos ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 194, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2868, 2722,
3093} \begin {gather*} \frac {\left (a^2 (m+2)+b^2 (m+1)\right ) \cos (e+f x) (d \sin (e+f x))^{m+1} \, _2F_1\left (\frac {1}{2},\frac {m+1}{2};\frac {m+3}{2};\sin ^2(e+f x)\right )}{d f (m+1) (m+2) \sqrt {\cos ^2(e+f x)}}+\frac {2 a b \cos (e+f x) (d \sin (e+f x))^{m+2} \, _2F_1\left (\frac {1}{2},\frac {m+2}{2};\frac {m+4}{2};\sin ^2(e+f x)\right )}{d^2 f (m+2) \sqrt {\cos ^2(e+f x)}}-\frac {b^2 \cos (e+f x) (d \sin (e+f x))^{m+1}}{d f (m+2)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2722
Rule 2868
Rule 3093
Rubi steps
\begin {align*} \int (d \sin (e+f x))^m (a+b \sin (e+f x))^2 \, dx &=\frac {(2 a b) \int (d \sin (e+f x))^{1+m} \, dx}{d}+\int (d \sin (e+f x))^m \left (a^2+b^2 \sin ^2(e+f x)\right ) \, dx\\ &=-\frac {b^2 \cos (e+f x) (d \sin (e+f x))^{1+m}}{d f (2+m)}+\frac {2 a b \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {2+m}{2};\frac {4+m}{2};\sin ^2(e+f x)\right ) (d \sin (e+f x))^{2+m}}{d^2 f (2+m) \sqrt {\cos ^2(e+f x)}}+\left (a^2+\frac {b^2 (1+m)}{2+m}\right ) \int (d \sin (e+f x))^m \, dx\\ &=-\frac {b^2 \cos (e+f x) (d \sin (e+f x))^{1+m}}{d f (2+m)}+\frac {\left (a^2+\frac {b^2 (1+m)}{2+m}\right ) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1+m}{2};\frac {3+m}{2};\sin ^2(e+f x)\right ) (d \sin (e+f x))^{1+m}}{d f (1+m) \sqrt {\cos ^2(e+f x)}}+\frac {2 a b \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {2+m}{2};\frac {4+m}{2};\sin ^2(e+f x)\right ) (d \sin (e+f x))^{2+m}}{d^2 f (2+m) \sqrt {\cos ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.22, size = 144, normalized size = 0.74 \begin {gather*} -\frac {\cos (e+f x) (d \sin (e+f x))^m \sin ^2(e+f x)^{\frac {1}{2} (-1-m)} \left (b^2 \, _2F_1\left (\frac {1}{2},\frac {1}{2} (-1-m);\frac {3}{2};\cos ^2(e+f x)\right ) \sin (e+f x)+a \left (a \, _2F_1\left (\frac {1}{2},\frac {1-m}{2};\frac {3}{2};\cos ^2(e+f x)\right ) \sin (e+f x)+2 b \, _2F_1\left (\frac {1}{2},-\frac {m}{2};\frac {3}{2};\cos ^2(e+f x)\right ) \sqrt {\sin ^2(e+f x)}\right )\right )}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 1.07, size = 0, normalized size = 0.00 \[\int \left (d \sin \left (f x +e \right )\right )^{m} \left (a +b \sin \left (f x +e \right )\right )^{2}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (d\,\sin \left (e+f\,x\right )\right )}^m\,{\left (a+b\,\sin \left (e+f\,x\right )\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________